package com.example.lewisgao.blankactivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

/**
 * Created by LewisGao on 2015-06-25 0025.
 */
public class SecondActivity extends Activity{

    private Button button;
    private String contnet="你好";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.second_activity);
        button = (Button) findViewById(R.id.button1);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent data = new Intent();
                data.putExtra("data",contnet);
                setResult(2,data);
                finish();
            }
        });
    }
}
